Skip to content

feat: implement admin-only oracle consensus threshold update (#75)#172

Closed
GoodnessJohn wants to merge 12 commits intoNetwalls:mainfrom
GoodnessJohn:feature/oracle-consensus-threshold-75
Closed

feat: implement admin-only oracle consensus threshold update (#75)#172
GoodnessJohn wants to merge 12 commits intoNetwalls:mainfrom
GoodnessJohn:feature/oracle-consensus-threshold-75

Conversation

@GoodnessJohn
Copy link
Contributor

  • Add set_consensus_threshold function with strict admin access control
  • Validate threshold >= 1 and <= oracle_count
  • Emit ThresholdUpdatedEvent with previous/new values and timestamp
  • Add 10 comprehensive unit tests covering:
    • Successful updates and boundary values
    • Unauthorized access attempts
    • Invalid threshold rejection (zero, exceeding count)
    • Event emission verification
    • Multiple updates and integration scenarios
  • Maintain deterministic execution and storage integrity
  • Include complete documentation and validation scripts

Closes #75

…s#75)

- Add set_consensus_threshold function with strict admin access control
- Validate threshold >= 1 and <= oracle_count
- Emit ThresholdUpdatedEvent with previous/new values and timestamp
- Add 10 comprehensive unit tests covering:
  - Successful updates and boundary values
  - Unauthorized access attempts
  - Invalid threshold rejection (zero, exceeding count)
  - Event emission verification
  - Multiple updates and integration scenarios
- Maintain deterministic execution and storage integrity
- Include complete documentation and validation scripts

Closes Netwalls#75
- Replace env.register(Contract, ()) with env.register_contract(None, Contract)
- Fix setup_oracle helper in oracle.rs tests
- Fix all contract registrations in oracle_test.rs
- Resolves compilation errors with latest Soroban SDK
- Fix multi-line assert! formatting
- Fix method chaining indentation
- Fix blank line spacing
- Resolves cargo fmt check failures
- Add IntoVal import for MockAuth args conversion
- Add Events import for env.events().all() method
- Resolves compilation errors in test module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Contract] Implement set_consensus_threshold in Oracle

1 participant